<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
<base href="<%=basePath%>">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="css/fileImage.css" />
</head>

<body>
	<div style="padding:15px 30px">
		<form id="userForm" method="post" enctype="multipart/form-data" >
			<input type="hidden" name="id" />
			<input type="hidden" name="image" />
	        <div style="margin-bottom:18px">
	            <input class="easyui-textbox" id="userCode" name="userCode" style="width:100%" data-options="label:'账号:',required:true,missingMessage:'账号必须填写'">
	        </div>
	        <div style="margin-bottom:18px">
	            <input class="easyui-textbox" id="name" name="name" style="width:100%" data-options="label:'姓名:',required:true,missingMessage:'用户名必须填写'">
	        </div>
	        <div style="margin-bottom:18px">
	            <input class="easyui-passwordbox"  name="password" prompt="Password" iconWidth="28" data-options="label:'密码:',required:true,missingMessage:'密码必须输入'" style="width:100%;height:34px;padding:10px">
	        </div>
	        <div style="margin-bottom:18px">
	            <input class="easyui-textbox" name="salt" style="width:100%" labelposition="left"  data-options="label:'盐值:',required:true,missingMessage:'盐值必须输入'">
	        </div>
	        <div style="margin-bottom:18px">
	        	<label class="textbox-label textbox-label-left" for="_easyui_textbox_input2" style="text-align: left; height: 26px; line-height: 26px;">性别:</label>
	            
	            <input type="radio" name="gender" id="" value="1" checked="checked" />男
	            <input type="radio" name="gender" id="" value="0" />女
	            
	        </div>
			<div style="margin-bottom:18px">
				<input class="easyui-numberbox" name="age" data-options="label:'年龄:',labelPosition:'left',min:0,max:200,required:true,missingMessage:'年龄必须输入(1~200)'" style="width:100%;">
			</div>
		    <div style="margin-bottom:18px">
		        <input class="easyui-datebox" name="birthday" label="出生日期:" labelPosition="left" style="width:100%;">
		    </div>
		    
	        <div style="margin-bottom:18px">
	        	<label class="textbox-label textbox-label-left" for="" style="text-align: left; height: 26px; line-height: 26px;">地址:</label>
	        	<label for="">省:</label>
			    <input class="easyui-combobox" id="sheng" name="" style="width:20%;" data-options=" 
			      url:'address/selectByTypeId', 
			      method:'get', 
			      valueField:'id', 
			      textField:'name', 
			      panelheight:'auto',
			    ">
	        	<label for="">市:</label>
			    <input class="easyui-combobox" id="shi" name="" style="width:20%;" data-options=" 
			      url:'', 
			      method:'get', 
			      valueField:'id', 
			      textField:'name', 
			      panelheight:'auto',
			    ">
	        	<label for="">区:</label>
			    <input class="easyui-combobox" id="qu" name="address.id" style="width:20%;" data-options=" 
			      url:'', 
			      method:'get', 
			      valueField:'id', 
			      textField:'name', 
			      panelheight:'auto',
			    ">
		    </div>
	        <div style="margin-bottom:18px">
	            <input class="easyui-textbox" name="detailed" style="width:100%" labelposition="left"  data-options="label:'详细地址:'">
	        </div>
			<div style="margin-bottom:18px">
				<input class="easyui-numberbox" name="phone" data-options="label:'手机号:',labelPosition:'left',min:0,max:200,required:true,missingMessage:'年龄必须输入(1~200)'" style="width:100%;">
			</div>
			<div style="margin-bottom:18px">
			    <input id="section" class="easyui-combobox" name="section.id" style="width:100%;" data-options=" 
			      url:'section/selectAll', 
			      method:'get', 
			      valueField:'id', 
			      textField:'name', 
			      panelheight:'auto',
			      label: '科室', 
			      labelposition: 'top'
			      ">
			</div>
 			<div style="margin-bottom:18px">
				<input id="roles" class="easyui-tagbox" label="角色:" labelposition="left" name="roleIds" style="width:80%" data-options="
					url: 'role/selectAll',
					method: 'get',
					valueField: 'id',
					textField: 'name',
					limitToList: true,
					hasDownArrow: true,
					prompt: 'Select a role',
					labelposition:'left',
					panelMaxWidth:'300',
					multiple:true,
					multiple:true,editable:false
				">
			</div>
 			<div style="margin-bottom:18px">
			    <label class="textbox-label textbox-label-left" for="" style="text-align: left; height: 26px; line-height: 26px;">头像:</label>
	            <a href="javaScript:void(0)" class="a-upload">
	                    <input type="file" name="photo" id="myFile" multiple="multiple"  class="fileImage" />
	                    <img id="preview" src="" width="100px" height="100px" alt="">
	            </a>
		  	</div>
		</form>
	</div>
    <script type="text/javascript" src="js/fileImage.js"></script>
    <script type="text/javascript">
		$("#sheng").combobox({
			onSelect:function(record){
				$("#shi").combobox("reload","address/selectByParent?parentId="+record.id+"");
			}
			
		})
		$("#shi").combobox({
			onSelect:function(record){
				$("#qu").combobox("reload","address/selectByParent?parentId="+record.id+"")
			}
		})
    	
    </script>
</body>
</html>